<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>龒蜗牛D - 腾讯 - QQ音乐</title>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
<link rel="shortcut icon" href="http://tv.sohu.com/favicon.ico">
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="//cdn.bootcss.com/jplayer/2.9.2/add-on/jplayer.playlist.min.js"></script>
<script src="//cdn.bootcss.com/jplayer/2.9.2/add-on/jquery.jplayer.inspector.min.js"></script>
<script src="//cdn.bootcss.com/jplayer/2.9.2/jplayer/jquery.jplayer.min.js"></script>
<link rel="stylesheet" type="text/css" href="/jp/styles.css" />
<style type="text/css" media="screen">
<!--
body{
  margin:0;
  padding:0;
  background:#333;
}

#jp_container_1{
  width:100%;
  margin:0 auto;
  min-width:330px;
}
.jp-jplayer{
  margin-bottom:-2px;
}
-->
a {
    color: #000000;
    text-decoration: none;
}
</style>
</head>
<body style="background-image:url('http://pic1.16pic.com/00/07/66/16pic_766152_b.jpg');background-repeat:no-repeat; background-attachment:fixed;background-size:100% 100%; width:100%; height:100%;">
<div class="container-fluid">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
	<!-- Brand and toggle get grouped for better mobile display -->
	<div class="navbar-header">
		<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
			<span class="sr-only">Toggle navigation</span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
		</button>
		<a class="navbar-brand" href="/jp/s.html">龒蜗牛D</a>
	</div>

	<!-- Collect the nav links, forms, and other content for toggling<li class="active"> -->
	<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
		<ul class="nav navbar-nav">
			<li class="dropdown">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown">
					分类
					<b class="caret"></b>
				</a>
				<ul class="dropdown-menu">
					<li>
						<a href="#">1</a>
					</li>
					<li class="divider"></li>
					<li>
						<a href="#">12</a>
					</li>
				</ul>
			</li>
		</ul>
		<form class="navbar-form navbar-left" role="search">
			<div class="form-group">
				<input type="text" name="qq" class="form-control" placeholder="搜索内容"></div>
			<button type="submit" class="btn btn-default">搜索</button>
		</form>
		<ul class="nav navbar-nav navbar-right">
			<li>
				<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":["mshare","weixin","sqq","qzone","tsina","tqq","fbook","twi","copy"],"bdPic":"","bdStyle":"0","bdSize":"32"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
			</li>
			<li class="dropdown">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown">
					设置
					<b class="caret"></b>
				</a>
				<ul class="dropdown-menu">
					<li>
						<a href="#">2</a>
					</li>
					<li class="divider"></li>
					<li>
						<a href="#">22</a>
					</li>
				</ul>
			</li>
		</ul>
	</div>
	<!-- /.navbar-collapse -->
</nav>
</div>
<div class="row">
	<div class="col-md-12 column" style="padding:0;">
	<div class="clearfix" style="margin-bottom: 50px;"></div>
	<!--资源开始-->
	<div class="list-group" id="JP_HL"></div>
	<!--/资源-->		
	</div>
</div>
<!--公共foot部分开始-->
<footer class="main-footer">
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation" style="background-color: #333;border-color: #333;">	
	<div class="row clearfix">
		<div class="col-md-12 column">
<!-- jp -->
	<div id="jp_container_1" class="jp-video jp-video-270p">
        <div class="jp-type-playlist">
            <div id="jquery_jplayer_1" class="jp-jplayer"></div>
            <div class="jp-gui">
            
                <div class="jp-video-play">
                    <a href="javascript:;" class="jp-video-play-icon" tabindex="1">播放</a>
                </div>
                <div class="jp-interface">
                    <div class="jp-controls-holder">
                        <ul class="jp-controls">
                            <!--<li><a href="javascript:;" class="jp-previous" tabindex="1">上一个</a></li>-->
                            <li><a href="javascript:;" class="jp-play" tabindex="1">播放</a></li>
                            <li><a href="javascript:;" class="jp-pause" tabindex="1">暂停</a></li>
                            <li><a href="javascript:;" class="jp-next" tabindex="1">下一个</a></li>
                            <li><a href="javascript:;" class="jp-stop" tabindex="1">停止</a></li>
                            <li><a href="javascript:;" class="jp-mute" tabindex="1" title="静音">静音</a></li>
                            <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="取消静音">取消静音</a></li>
                            <li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="最大音量">最大音量</a></li>
                        </ul>
                        <div class="jp-volume-bar">
                            <div class="jp-volume-bar-value"></div>
                        </div>
                        <ul class="jp-toggles">
                            <li><a href="javascript:;" class="jp-full-screen" tabindex="1" title="全屏">全屏</a></li>
                            <li><a href="javascript:;" class="jp-restore-screen" tabindex="1" title="退出全屏">退出全屏</a></li>
							<li><a href="javascript:;" class="jp-shuffle" tabindex="1" title="随机播放">随机播放</a></li>
                            <li><a href="javascript:;" class="jp-shuffle-off" tabindex="1" title="关闭随机">关闭随机</a></li>
                            <li><a href="javascript:;" class="jp-repeat" tabindex="1" title="重复播放">重复播放</a></li>
                            <li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="关闭重复">关闭重复</a></li>
                        </ul>
                    </div>
                    <div class="jp-progress">
                        <div class="jp-seek-bar">
                            <div class="jp-play-bar"><i></i></div>
                        </div>
                    </div>
                    <div class="jp-current-time"></div>
                    <div class="jp-duration"></div>
                    <div class="jp-title" style="display: none;">
                        <ul>
                            <li></li>
                        </ul>
                    </div>
                </div>
            </div>
			<div class="jp-playlist" style="display: none;">
                <ul>
                    <li></li>
                </ul>
            </div>
            <div class="jp-no-solution">
                <span>Update Required</span>
                To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
            </div>
        </div>
    </div>
<!-- /jp -->
		</div>
	</div>
</nav>
<script>
var pg;
var kw;
var WNJP;
$(document).ready(function(){
	$("#jquery_jplayer_1").css("height","5px");
	if(location.search.substring(1).match(/kg=/)){
		KUGOU(location.search.substring(1).replace(/kg=(.+)/, "$1"));
	}else if(location.search.substring(1).match(/qq=/)){
		QQYY(location.search.substring(1).replace(/qq=(.+)/, "$1"));
	}
	WNJP = new jPlayerPlaylist({
		jPlayer: "#jquery_jplayer_1",
		cssSelectorAncestor: "#jp_container_1"
		}, [], {
		ready: function(){
		//单击播放/暂停
		$(this).bind($.jPlayer.event.click, function(){
			var isPaused = $(this).data().jPlayer.status.paused;
			if(isPaused){
				$(this).jPlayer("play");
			}else{
				$(this).jPlayer("pause");
			}
		});
		//双击全屏切换
		$(this).dblclick(function(){
			if($(".jp-video-full").length > 0){
				$(".jp-restore-screen").click();
			}else{
				$(".jp-full-screen").click();
			}
		});
		},
		playlistOptions: {
			autoPlay: true,
			enableRemoveControls: false
		},
		swfPath:	"/jp/Jplayer.swf",
		solution: "flash, html",//flash, 
		supplied:	"mp3, webmv, ogv, m4v, m4a, oga",
		size:{
			width:		"100%",
			height:		"5px",
			cssClass:	"jp-video-360p"
		},
		play: function(event) {
			document.title = event.jPlayer.status.media.title;
			if (event.jPlayer.status.formatType === "m4v"){
				$("#jquery_jplayer_1").css("height","500px");
			}else if (event.jPlayer.status.formatType === "mp3"||event.jPlayer.status.formatType === "m4a"){
　　			$("body").css("background-image","url(" + event.jPlayer.status.media.png + ")");
				$("#jquery_jplayer_1").css("height","5px");
			}
		}
	});
	$(document.documentElement).keydown(function(event) {
		//空格暂停
		if(event.which === 32){
			if($(".jp-jplayer").data("jPlayer").status.paused){
			   $(".jp-jplayer").jPlayer("play");
			}else{
			   $(".jp-jplayer").jPlayer("pause");
			}
			event.preventDefault();
		}
		//ESC取消全屏
		if(event.which === 27){
			$(".jp-video-full .jp-restore-screen").click();
			event.preventDefault();
		}
	});
});
WNJP.play(0);
function QQYY(src){
	if(src.match(/@/)){
		kw = src.replace(/(.+)@(.+)/, "$1");
		pg = src.replace(/(.+)@(.+)/, "$2");
	}else{
		kw = src;
		pg='1';
	}
	$.ajax({
		cache: true,
		async:false,
		url: "http://soso.music.qq.com/fcgi-bin/fcg_search_xmldata.fcg?source=10&w="+kw+"&type=qry_song&out=json&p="+pg+"&perpage=500&ie=utf-8&uin=121027740&inCharset=UTF-8&outCharset=UTF-8&hostUin=121027740&notice=0&needNewCode=0&format=jsonp&platform=musicbox&g_tk=1401129420",//&jsonpCallback=searchJsonCallback  encodeToGb2312(ssrc)
		type: "GET",
		dataType: "jsonp",
		jsonpCallback: 'searchJsonCallback',
		contentType: "application/jsonp; charset=utf-8",
		timeout: 3e3,
		success: function(json) {
			QQ_List_success_jsonpCallback(json.list);
		}
	});
}
function QQ_List_success_jsonpCallback(data){
	var JP_List = "[";
	$.each(data, function(k, v) {
		JP_List += '{m4a:"http://dl.stream.qqmusic.qq.com/C100'+v.songmid+'.m4a?fromtag=38",artist:"龒蜗牛D",png:"http://img.pconline.com.cn/images/upload/upc/tx/wallpaper/1301/16/c0/17448568_1358310737079.jpg",title:"'+(v.songname).replace(/(.+)\((.+)/, "$1")+'"},';//(v.songname).replace(/(.+)\((.+)/, "$1")
	});
	JP_List += "]";
	eval("JP_Lists=" + JP_List);
	console.log(JP_List);
	WNJP.setPlaylist(JP_Lists);
	//
	var JP_HList='';
	$.each(data, function(k, v) {
		JP_HList+='<div class="list-group-item" style="background-color: rgba(255, 255, 255, 0.3);"><span class="badge"><a href="http://dl.stream.qqmusic.qq.com/C100'+v.songmid+'.m4a?fromtag=38" download="m4a"><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span></a></span><a href="javascript:WNJP.play('+k+');">'+v.songname+'</a></div>';
	});
	$('#JP_HL').html(JP_HList);
	WNJP.play(0);
}
</script>
</body>
</html>
